package com.lebang.mapper;

import com.lebang.configuration.datasource.DataSource;
import com.lebang.domain.CencesMaster;
import com.lebang.example.CencesMasterExample;
import com.lebang.model.cences.MasterCountModel;
import com.lebang.model.cences.MasterMoneyModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * CencesMasterMapper继承基类
 */
@Mapper
public interface CencesMasterMapper extends MyBatisBaseDao<CencesMaster, Integer, CencesMasterExample> {
    List<MasterMoneyModel> selectRebateApprenticeMoney(@Param("brand") String brand, @Param("star") LocalDateTime star, @Param("end") LocalDateTime end, @Param("type") Integer type);

    CencesMaster sumData(@Param("star") Integer star, @Param("end") Integer end, @Param("appStore") String appStore, @Param("category") int category, @Param("type") int type, @Param("likeBrand") String likeBrand, @Param("appId") Integer appId);

    List<MasterCountModel> selectAllTsMember(@Param("brand") String s, @Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    List<MasterCountModel> selectAllMember(@Param("brand") String brand, @Param("star") LocalDateTime star, @Param("end") LocalDateTime end);


    List<MasterCountModel> selectByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    @DataSource("commonDB")
    int insertAll(CencesMaster cencesMaster);
}